package lecture06.rectangle;

class Rectangle {
    double width;
    double height;
    public double getArea() {
        return width * height;
    }
    public double getPerimeter() {
        return 2*(width + height);
    }
}


public class RectangleInf {
    public static void main(String[] args) {
        Rectangle r1 = new Rectangle();
        r1.width = 4;
        r1.height = 40;
        System.out.println("area=" + r1.getArea());
        System.out.println("perimeter=" + r1.getPerimeter());
        Rectangle r2 = new Rectangle();
        r2.width = 3.5;
        r2.height = 35.9;
        System.out.println("area=" + r2.getArea());
        System.out.println("perimeter=" + r2.getPerimeter());
    }
}
